#include <stdio.h>
int main(void){
	int year = 2014,month = 1,day = 1;
	printf("请输入你的年份：\n");
	scanf("%d",&year);
	printf("请输入你的月份：\n");
	scanf("%d",&month);
	if(year % 4 == 0 && year % 100 !=0 ||year % 400 ==0){
		printf("%d是闰年\n",year);
		if(month == 1||month == 3||month == 5||month == 7||month == 8||month == 10||month == 12){
			day = 31;
		}
		else if(month = 2){
			day = 29;
		}
		else{
			day = 30;
		}
	}
	else{
		printf("%d不是闰年！\n",year);
		if(month == 1||month == 3||month == 5||month == 7||month == 8||month == 10||month == 12){
			day = 31;
		}
		else if(month = 2){
			day = 28;
		}
		else{
			day = 30;
		}
	}
	printf("%d年%d月有%d天\n",year,month,day);
}
